.statistics-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: calc(100% - 40px);
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #2196F3;
  backdrop-filter: blur(10px);
  z-index: 1000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
  max-width: 500px; /* 限制最大宽度 */
}

/* 在小屏幕设备上调整位置，避免与控制面板重叠 */
@media (max-width: 768px) {
  .statistics-panel {
    max-width: calc(100% - 40px);
    bottom: 80px; /* 为控制面板留出空间 */
  }
}

.statistics-panel h3 {
  margin: 0 0 15px 0;
  color: #2196F3;
  font-size: 18px;
  text-align: center;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(50, 50, 50, 0.8);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  border: 1px solid #444;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #fff;
}

.stat-value.occupied {
  color: #4CAF50;
}

.stat-value.empty {
  color: #f44336;
}

.stat-value.rate {
  color: #2196F3;
}

.stat-label {
  font-size: 14px;
  color: #aaa;
}

.layer-stats h4 {
  margin: 0 0 15px 0;
  color: #2196F3;
  font-size: 16px;
  text-align: center;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.layer-item {
  background: rgba(40, 40, 40, 0.8);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #444;
}

.layer-name {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 8px;
  text-align: center;
}

.layer-progress {
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.layer-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
}